﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using OPLService.BusinessEntities;

namespace OPLService.Contract
{

    [ServiceContract]
    public interface IOPLService
    {
        [OperationContract]
        [WebGet(UriTemplate = "GetData?value={value}", ResponseFormat = WebMessageFormat.Json)]
        string GetData(int value);

        [OperationContract]
        [WebGet(UriTemplate = "GetNotifications?dateAsElapsedMS={dateAsElapsedMS}&Interval={interval}", ResponseFormat = WebMessageFormat.Json)]
        DTO GetNotifications(ulong dateAsElapsedMS, double interval);

        [OperationContract]
        [WebGet(UriTemplate = "GetLatestNotifications?count={count}&lowerLimit={lowerLimit}", ResponseFormat = WebMessageFormat.Json)]
        DTO GetLatestNotifications(int count, int lowerLimit);

        //[OperationContract]
        //[WebGet(UriTemplate = "AddNotifications?notifyString={notifyString}", ResponseFormat = WebMessageFormat.Json)]
        //DTO AddNotifications(string notifyString);

        [OperationContract]
        [WebInvoke(UriTemplate = "AddNotifications", Method = "POST", BodyStyle = WebMessageBodyStyle.WrappedRequest,
         RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        DTO AddNotifications(string notifyString);
        
     }
}
